package itman.mall.feign;

import itman.mall.feign.impl.FoodFeignClientCallBack;
import itman.mall.po.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

// 指定调用的食品微服务名
//@FeignClient注解的fallback属性指定熔断降级方法
@FeignClient(name="food-server",fallback=FoodFeignClientCallBack.class)
public interface FoodFeignClient {

    @GetMapping("/food/listFoodByBusinessId/{businessId}")
    public CommonResult listFoodByBusinessId(@PathVariable("businessId") Integer businessId);
}